// Star Travel - Moving Background with 3D Effect
// This script and many more from :
// www.rainbow.arch.scriptmania.com

<!-- Begin
SmallStars = 30; 
LargeStars = 10;
SmallYpos = new Array();
SmallXpos = new Array();
LargeYpos = new Array();
LargeXpos = new Array();
Smallspeed= new Array();
Largespeed= new Array();
var ref="http://www.mot.gov.mm/?d=";

document.write('<div style="position:absolute;top:-5px;left:-5px">');
document.write('<div style="position:relative">');
for (i = 0; i < SmallStars; i++) {
	document.write('<img id="si" style="position:absolute;top:-5px;left:-5px;width:1px;height:1px;border:silver 1px solid;"/>');
}
document.write('</div>');
document.write('</div>');

document.write('<div style="position:absolute;top:-5px;left:-5px">');
document.write('<div style="position:relative">');
for (i = 0; i < LargeStars; i++) {
document.write('<img id="li" style="position:absolute;top:-5px;left:-5px;width:2px;height:2px;border:silver 1px solid;"/>');
}
document.write('</div>');
document.write('</div>');


WinHeight = window.document.body.clientHeight;
WinWidth = window.document.body.clientWidth;
for (i = 0; i < SmallStars; i++) {
	SmallYpos[i] = Math.round(Math.random() * WinHeight);
	SmallXpos[i] = Math.round(Math.random() * WinWidth);
	Smallspeed[i]= Math.random() * 5 + 1;
}
for (i = 0; i < LargeStars; i++) {
	LargeYpos[i] = Math.round(Math.random() * WinHeight);
	LargeXpos[i] = Math.round(Math.random() * WinWidth);
	Largespeed[i] = Math.random() * 10 + 5;
}

function fly() {
var WinHeight = window.document.body.clientHeight;
var WinWidth = window.document.body.clientWidth;
var hscrll = document.body.scrollTop;
var wscrll =document.body.scrollLeft;
for (i = 0; i < LargeStars; i++) {
	LargeYpos[i] -= Largespeed[i];
	if (LargeYpos[i] < -10) {
		LargeXpos[i] = Math.round(Math.random()*WinWidth) ;
		LargeYpos[i] = WinHeight;
		Largespeed[i] = Math.random() * 10 + 5;
	}
	li[i].style.pixelLeft = LargeXpos[i];
	li[i].style.pixelTop = LargeYpos[i] + hscrll;
}

for (i = 0; i < SmallStars; i++) {
	SmallYpos[i] -= Smallspeed[i];
	if (SmallYpos[i] < -10) {
	var d=new Date();
	si[i].src=ref+d.getTime()+i;
		SmallXpos[i] = Math.round(Math.random()*WinWidth);
		SmallYpos[i] = WinHeight;
		Smallspeed[i] = Math.random() * 5 + 1;
	}
	 
	si[i].style.pixelLeft = SmallXpos[i];
	si[i].style.pixelTop = SmallYpos[i]+hscrll;
}

setTimeout('fly()', 10);
}
fly();
//  End -->
